     


// 各设备适配
document.documentElement.style.fontSize = document.documentElement.clientWidth/7.5 +'px';
// 增加或减少按钮

function loadingToast(){
	var msg;
	arguments[0] ? msg = arguments[0] : msg = '数据加载中' ;
	var loadingToast;
	loadingToast = '\
		<div id="loadingToast" class="weui_loading_toast" style="display:none;">\
			<div class="weui_mask_transparent"></div>\
			<div class="weui_toast">\
				<div class="weui_loading">\
					<div class="weui_loading_leaf weui_loading_leaf_0"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_1"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_2"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_3"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_4"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_5"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_6"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_7"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_8"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_9"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_10"></div>\
					<div class="weui_loading_leaf weui_loading_leaf_11"></div>\
				</div>\
				<p class="weui_toast_content">' + msg + '</p>\
			</div>\
		</div>\
	';
	if(!$('#loadingToast').length){
		$('body').append(loadingToast);
	}else{
		$('#loadingToast .weui_toast_content').html(msg);
	}
	$('#loadingToast').fadeIn('fast');
}

function imageMax(){
    var height = $(document).height();
    var width  = $(document).width();

    $('.img-box').each(function(){
        var dHeight  = $(this).height();
        var dWidth   = $(this).width();
        $(this).css({
            top:(height-dHeight)/2,
            left:(width-dWidth)/2,
        });
    })
    $('td img').click(function () {
        if($('.img-box').is(':hidden')){
            var oSrc = $(this).attr('src');
            $('.img-box img').attr('src',oSrc)
            $('.img-box').slideDown();
        }else{
            $('.img-box').slideUp();
        }
    })
    $('.img-box').click(function(){
        if($('.img-box').is(':visible')){
            $(this).slideUp();
        }
    });
}